package com.gao.g_message_return;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.RabbitTemplate;

/**
 * @author gao
 * @time 2022/07/05 14:18:15
 */
@Slf4j
public class RabbitReturnCallback implements RabbitTemplate.ReturnCallback {
    @Override
    public void returnedMessage(Message message, int replyCode, String replyText, String exchange, String routingKey) {
        log.info("返回消息：{}，响应码：{}，交换机：{}，路由键：{}", replyText, replyCode, exchange, routingKey);
    }
}
